package com.jwt.serivce.impl;

import com.jwt.dao.UserDao;
import com.jwt.pojo.User;
import com.jwt.serivce.UserSerivce;
import lombok.experimental.Accessors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserSerivceimpl implements UserSerivce {
    @Autowired
    private UserDao userDao;

    @Override
    public User findBy(User user) {
        User user1 = userDao.findBy(user);
        if (user1!=null) {
            return user1;
        }
       throw  new RuntimeException("登录失败...");
    }
}
